package com.smxy.mall.model.news;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

@ApiModel
@Data
public class NewsRequest {
    private Integer id;
    @ApiModelProperty(value = "categoryId", example = "1")
    @NotNull(message = "缺少分类categoryId")
    private Integer categoryId;
    @NotNull(message = "标题不能为null")
    @NotBlank(message = "标题不能为空")
    private String title;
    private String info;
    private String cover;
    private String content;
}
